# a=len('我是谁'.encode('gb2312'))
# print(a)
# print('%2d-%02d' % (3, 1))
# print('%.2f' % 3.1415926)

#循环
#
# names = ['Michael', 'Bob', 'Tracy']
# for name in names:
#     print(name)

#数组循环求和
# sum = 0
# for x in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:
#     sum = sum + x
# print(sum)

sum = 0
for x in range(101):
    sum = sum + x
print(sum)


# sum = 0
# n = 99
# while n > 0:
#     sum = sum + n
#     n = n - 2
# print(sum)